<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
$itemId = $_REQUEST['itemVal'];
$sizeId = $_REQUEST['sizeVal'];
$companyId = $_REQUEST['companyVal'];

$compArry = array();
$k = 0;
$selectCompany = "SELECT quality.qualityId,quality.qualityName
                 FROM quality
                 JOIN subItem ON subItem.qualityId = quality.qualityId
                 WHERE itemId='$itemId' and sizeId='$sizeId' and companyId='$companyId'
                 ORDER BY qualityName";
$selectCompanyResult = mysql_query($selectCompany);
while($compRow = mysql_fetch_array($selectCompanyResult))
{
	$compArry['qualityId']   = $compRow['qualityId'];
	$compArry['qualityName'] = $compRow['qualityName'];
	$k++;
}
include("./bottom.php");
$smarty->assign('compArry',$compArry);
$smarty->display('ajaxRisponceIcompany.tpl');
?>